<{include file="header.tpl"}>
<style>
   li { line-height:28px; border-bottom:1px dashed #ccc; }
</style>
<form name="form1" action="" method="POST">
    <div class="comBox">
        <div class="comHeader">
            组权限管理 -- 新增用户组
        </div>
        <div class="comTable bt">
            <input type='hidden' name='even' value='addsave'/>
            <div style="padding:15px;">
            <div>用户组名称：<input name="group_name" value="" /></div>
                <{foreach from=$config_apps key=k item=v}>
                <div style='padding-left:10px;'>
                    <div class='title' style='line-height:28px;border-bottom:1px dashed #ccc;font-weight:bold;'>
                        <label><input type='checkbox' name='groups[]' value='<{$k}>-*'

                        alt="ac_<{$k}>" class="ct"   />
                            <{$v.app_name}> </label>
                    </div>
                    <div style='line-height:28px;width:90%;padding-top:10px;'>
                        <{foreach from=$v key=kk item=vv name=foo}>
                        <{if $kk != 'app_name'  }>
                        <{if $smarty.foreach.foo.index > 1 and $smarty.foreach.foo.index-1 mod 4 eq 0}><br /><{/if}>
                        <span style="display:-moz-inline-box; display:inline-block; width:200px;">
                            <label><input class="ac_<{$k}>" type='checkbox' name='groups[]' value='<{$k}>-<{$kk}>' /> <{$vv}></label>
                        </span>
                        <{/if}>
                        <{/foreach}>
                    </div>
                </div>
                <br />
                <{/foreach}>
                <div class="submit">
                </div>
                <div style="margin-top:15px">
                    <button type="submit" class="sub">增加用户组</button>&nbsp;
                </div>
            </div><!--<div style="padding:15px;">-->

        </div><!--comTable-->
    </div><!--comBox-->
</form>
<script>
$(document).ready(function(){
    $(".ct").change(function(){
        var c = $(this).attr("alt");
        if($(this).attr("checked")){ 
            $("."+c).each(function(){
                $(this).attr("disabled",true);
            });
        }else{
            $("."+c).each(function(){
                $(this).attr("disabled",false);
            }); 
        }
    });
    
});
</script>

<{include file="footer.tpl"}>


